<?php

use Illuminate\Routing\Router;

Route::group([
    'prefix' => 'admin/AutoLdap',
    'namespace' => 'Buu\\Modules\\AutoLdap\\Controllers',
    'middleware' => [
        'web',
        'admin'
    ],
], function (Router $router) {
    $router->get('/department', 'IndexController@department'); // 部门组
    $router->get('/project', 'IndexController@project'); // 项目组
    $router->get('/department/{id}/edit', 'IndexController@groupEdit'); // 修改部门
    $router->get('/project/{id}/edit', 'IndexController@groupEdit'); // 修改部门
    $router->delete('/project/{id}', 'IndexController@deleteProjectGroup'); // 删除组织
    $router->get('/project/create', 'IndexController@createGroup'); // 创建项目
    $router->get('/searchproject{q?}', 'IndexController@searchProject'); // 搜索组
    $router->post('/savegroupinfo', 'IndexController@saveGroupInfo'); // 保存组
    $router->post('/createGroup', 'IndexController@saveGroup'); // 创建组
    $router->get('/initLdap', 'IndexController@initLdap'); // 初始化ldap信息
});
